<script setup>
import LineStyle from "@/plugins/common/options/lineStyle.vue"

const props = defineProps(["options"])
const option = toRef(props, "options")
</script>

<template>
  <div class="border-dotted border-2 p-1 ml-1 rounded mb-1">
    <a-form-item label="显示引导线">
      <xiri-form v-model="option.show" option="switch" />
    </a-form-item>
    <template v-if="option.show">
      <a-form-item label="第一段长度">
        <xiri-form v-model="option.length" option="number" />
      </a-form-item>
      <a-form-item label="第二段长度">
        <xiri-form v-model="option.length2" option="number" />
      </a-form-item>
      <a-form-item
        label="最小夹角"
        help="通过调整第二段线的长度，限制引导线两端之间最小的夹角，以防止过小的夹角导致显示不美观"
      >
        <xiri-form v-model="option.minTurnAngle" min="0" max="180" option="number" />
      </a-form-item>
      <a-form-item
        label="最大夹角"
        help="通过调整第二段线的长度，限制引导线与扇区法线的最大夹角。设置为小于 90 度的值保证引导线不会和扇区交叉"
      >
        <xiri-form v-model="option.maxSurfaceAngle" min="0" max="180" option="number" />
      </a-form-item>
      <line-style :options="option.lineStyle" />
    </template>
  </div>
</template>

<style scoped lang="less"></style>
